<?php if(!defined("PATH_HD"))exit;C("SHOW_NOTICE",false);?><!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="http://localhost/1-24qiye/admin/tpl/public/css/category.css"/>
    </head>
    <body>
        <h2>
            <a href="<?php echo U('addshow');?>">添加顶级栏目</a>
        </h2>
        <table class="table1">
            <thead>
                <tr>
                    <th width="10">CID</th>
                    <th>栏目名称</th>
                    <th  width="200">操作</th>
                </tr>
            </thead>
            <tbody>
                <?php $hd["list"]["n"]["total"]=0;
if(!empty($data)):
$hd_list_total = count($data);
$hd_list_row = min($hd_list_total,1000);
$hd_list_row = floor($hd_list_row/1);
$hd_list_id=0;
$hd_list_start=1;
$hd_list_step=0;foreach($data as $hd_list_key =>$hd_list_value):
if($hd_list_start<1){$hd_list_start++;continue;}
if($hd_list_step %1!=0){$hd_list_step++;continue;}
$hd_list_step++;$hd["list"]["n"]["first"]=$hd_list_id==0?true:false;
$hd["list"]["n"]["last"]=$hd_list_id>=$hd_list_row-1?true:false;
$hd["list"]["n"]["index"]=$hd_list_id+1;
$n=$hd_list_value;?>

                <tr>
                    <td><?php echo $n['cid'];?></td>
                    <td><?php echo $n['catname'];?></td>
                    <td>
                        <a href="#">添加子栏目</a> |
                        <a href="#">添加文章</a> |
                        <a href="#">删除栏目</a>
                    </td>
                </tr>
                    <?php if($hd_list_id+1>=$hd_list_row){break;}
$hd_list_id++;
endforeach;
$hd["list"]["n"]["total"]=$hd_list_id+1;
endif;
?>
            </tbody>
        </table>
    </body>
</html>
